package com.kaifamiao.demo.d0826;

import java.awt.image.LookupOp;
import java.util.ArrayList;
import java.util.List;

public class Demo06 {

    public static void main(String[] args) {
        StringBuffer sb = new StringBuffer();

        sb.append("a").append("b").append("c");

        Loop loop = new Loop();

        System.out.println(loop.set("a").set("b").set("c"));
    }
}

class Loop {

    List<String> list = new ArrayList<>();
    public Loop set(String str){
        list.add(str);
        return this;
    }

    @Override
    public String toString(){
        return list.toString();
    }
}
